Skip to content

Open upstream release docs PR as draft#801

Merged
rdimitrov merged 2 commits intomainfrom
upstream-release-draft-pr
Apr 23, 2026
Merged

Open upstream release docs PR as draft#801
rdimitrov merged 2 commits intomainfrom
upstream-release-draft-pr

Conversation

@rdimitrov
Copy link
Copy Markdown
Member

Description

Keep the auto-generated release docs PR as a draft until the full augmentation job (skill, editorial review, autofix, body update, reviewer assignment) finishes. Prevents accidental approve/merge on a half-written PR and consolidates reviewer notifications into a single coherent signal when the PR is actually reviewable.

Flow on a happy path:

  1. Renovate or bootstrap opens the PR → flipped to draft
  2. Skill generation → docs-review → autofix → commit/push
  3. Reviewers assigned (single review-requested email fires)
  4. PR body augmented
  5. Flipped back to ready for review

On failure the PR stays as draft; the existing failure-comment step points reviewers to the retry command.

Changes to .github/workflows/upstream-release-docs.yml:

  • Bootstrap gh pr create now uses --draft.
  • New Convert PR to draft step right after the PR number resolves. isDraft pre-check keeps it idempotent on retries.
  • Assign reviewers and prepare contributor mentions step moved from pre-skill (early) to after the commit/push, directly before body augmentation. GitHub sends the review-requested email when gh pr edit --add-reviewer runs, so this is the moment reviewers are pinged.
  • New Flip PR to ready for review step after body augmentation, gated on success() so failed runs leave the PR as draft.

Type of change

  • Bug fix (typo, broken link, etc.)

Related issues/PRs

Discussed internally while watching the toolhive 0.24.1 docs PR progress.

Test plan

  • Dispatch the workflow manually via bootstrap (gh workflow run upstream-release-docs.yml -f project_id=<id> -f new_tag=<tag>) against a test project and confirm the PR opens as draft, reviewers are assigned only after the body is augmented, and the PR flips to ready at the end.
  • Dispatch a retry (gh workflow run upstream-release-docs.yml -f pr_number=<n>) against a PR already in draft state and confirm no-op on the draft flip.
  • Force a failure (e.g., invalid input) and confirm the PR remains draft after the run ends.

🤖 Generated with Claude Code

Keep the auto-generated release docs PR as a draft until the full
augmentation job (skill, review, autofix, body update, reviewer
assignment) finishes. Prevents accidental approve/merge on a half-
written PR and consolidates reviewer notifications to a single
coherent signal when the PR is actually reviewable.

- Bootstrap PR now created with --draft
- New "Convert PR to draft" step flips Renovate-opened PRs at the
  start of the job (idempotent via isDraft check)
- Reviewer assignment moved from pre-skill to post-commit-push so
  the review-requested email fires alongside the body augmentation
- New "Flip PR to ready for review" step at the end, gated on
  success() so failed runs leave the PR as draft for a human

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 23, 2026 15:39
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-website Ready Ready Preview, Comment Apr 23, 2026 3:52pm

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the upstream release docs automation workflow to keep auto-generated PRs in draft until the full augmentation pipeline (skill generation, editorial review, autofix, body update, reviewer assignment) finishes, reducing the risk of reviewers acting on an incomplete PR and consolidating reviewer notifications.

Changes:

  • Bootstrap-created PRs are now opened as draft (gh pr create --draft).
  • Renovate/retied PRs are explicitly converted to draft at the start of the augmentation job, and flipped back to ready for review only at the end on success.
  • Reviewer assignment is moved later in the workflow to occur after commit/push, near the PR body augmentation.

Comment thread .github/workflows/upstream-release-docs.yml Outdated
Comment thread .github/workflows/upstream-release-docs.yml
Two issues surfaced in Copilot's review of the initial commit:

- "Convert PR to draft" runs before the PR branch is checked out,
  so `gh pr view` / `gh pr ready` must pass --repo or they fail
  with "not a git repository". The existing pre-checkout step at
  line 121 already calls this out; apply the same fix here.

- Moving reviewer assignment to the end of the job introduces a new
  state: the augment-PR-body step is `if: always()`, but reviewers
  is not, so on upstream skill/autofix failures the augment step
  runs with `COMPARE_OK` unset. The previous `!= "true"` branch
  rendered that as "Compare failed — pinned tag missing upstream",
  which is misleading because the compare was never attempted.
  Handle empty as a distinct "Not attempted" branch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rdimitrov rdimitrov merged commit f220747 into main Apr 23, 2026
4 checks passed
@rdimitrov rdimitrov deleted the upstream-release-draft-pr branch April 23, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants